package file;

import java.io.File;

public class Demo3 {

	public static void main(String[] args) {
		File f=new File("e:\\aa");
		delete(f);
	}

	private static void delete(File f) {
		if(f.isDirectory()){
		File[] fs=f.listFiles();
		for (File file : fs) {
			delete(file);
			
		}
		
		
	}
	f.delete();
	System.out.println(f.getPath()+"已经删除");
	}


	}
